package com.javafactroy.kunlong.codefactroy.service.domain.valueobj;

import cn.hutool.core.util.StrUtil;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

@Data
public class ColPropsValueObj {

    List<ColPropValueObj> colPropValueObjectList;

    public ColPropsValueObj() {
        colPropValueObjectList = new ArrayList<>();

    }

    public String toCodeString() {
        return StrUtil.join("\r\n",
                colPropValueObjectList.stream().map(i ->
                        i.getStringTemplate().parse(i.toCodeString())).collect(Collectors.toList()));
    }
}
